package com.landun.market.pojo.model;

import com.landun.market.pojo.enums.Gender;
import com.landun.market.pojo.enums.StateCode;
import com.landun.market.pojo.enums.UserType;
import lombok.*;

import java.util.Date;

/**
 * @author jiang.chuan
 * @date 2018-05-11
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
public class User extends BaseModel {
    private static final long serialVersionUID = -5331988874899645425L;

    private String loginName;
    private String password;
    private String name;
    private String nickname;
    private String email;
    private String mobile;
    private Gender gender;
    private Date birthday;
    private String company;
    private UserType type;
    private Boolean reserved;
    private Date expiryTime;
    private Integer loginCount;
    private String lastHost;
    private StateCode state;

    @Builder
    public User(Integer id, String name, String nickname, String mobile, String company) {
        this.setId(id);
        this.name = name;
        this.nickname = nickname;
        this.mobile = mobile;
        this.company = company;
    }
}